﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/TempAdmin.master" CodeFile="ProductOfService.aspx.cs" Inherits="admin_DemontrationOfService" %>

<asp:Content ID="demontrationService" runat="server" ContentPlaceHolderID="ContentRight">
    <div>
        <div>    
            <img src="../img/pixel_trans.gif" height="10px" />
            <form id="fomr1" runat="server">
            <div align="center">
                <asp:Label ID ="lblTextMessage" runat="server"></asp:Label>
            </div>
            <asp:GridView ID="gvProductOfService" DataKeyNames="ProductID" DataSourceID="odsProductOfService" 
                runat="server" AutoGenerateColumns="false" 
                BorderColor="#000066" ForeColor="#003300">
                <Columns>
                    <asp:BoundField HeaderStyle-HorizontalAlign="Center" DataField="ProductID" ReadOnly="true" HeaderText ="Mã" InsertVisible="false" >
                        <ItemStyle HorizontalAlign="Center" ForeColor="Gray" />
                        <ControlStyle BackColor="Black"></ControlStyle>
                    </asp:BoundField>
                    <asp:BoundField HeaderStyle-HorizontalAlign="Center" DataField="ProductName" ReadOnly ="true" HeaderText="Tên Sản Phẩm" InsertVisible="false">
                        <ItemStyle HorizontalAlign="Center" ForeColor="Gray" />
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemStyle HorizontalAlign ="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbUpdate" runat="server" style="color:Blue; font-family: tahoma; text-decoration: none" CommandName="select">&nbsp;&nbsp;&nbsp;&nbsp;Chi 
                            tiết [&gt;&gt;]</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemStyle HorizontalAlign ="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbDelete" runat="server" style=" color:Blue; font-family:tahoma; text-decoration: none" OnClientClick='return confirm("Bạn có chắc chắn muốn xóa sản phẩm này không ?")' CommandName="delete">&nbsp;&nbsp;&nbsp;&nbsp;Xóa 
                            [x]</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>   
            <asp:ObjectDataSource ID="odsProductOfService" runat="server" 
                DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" 
                SelectMethod="GetProductOfServiceByServiceID" 
                TypeName="BonSaiTableAdapters.ProductOfServiceTableAdapter">
                <DeleteParameters>
                    <asp:Parameter Name="Original_ProductID" Type="Int32" />
                </DeleteParameters>
                <SelectParameters>
                    <asp:QueryStringParameter DefaultValue="null" Name="ServiceID" 
                        QueryStringField="ServiceID" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </form>        
    </div>    
        </div>
</asp:Content>
